<h2>Add a new article</h2>
<form method="post" action="">
	
    <div class="error">@Page.Errors</div>
    <fieldset><legend>
        Add article
	</legend>
    <table>
        <tr>
            <th><label for="title" >Title : </label></th>
            <td><input type="text" name="title" value="@Request.Form["title"]" size="55"/></td>
        </tr>
        <tr>
            <th><label for="summary">Summary : </label></th>
            <td>
                <textarea id="TinyArea1" name="summary" rows="5" cols="80" style="width: 100%">
                @Request.Form["summary"]
                </textarea>
             </td>
        </tr>
        <tr>
            <th><label for="content">Content : </label></th>
            <td>
                <textarea id="TinyArea" name="content" rows="15" cols="80" style="width: 100%">
                @Request.Form["content"]
                </textarea>
             </td>
        </tr>
        <tr>
            <th></th>
            <td><input type="checkbox" name="published" value="1" @(Request.Form["published"].AsInt()==1?"checked":" ")/><label for="published"> Published</label></td>
		</tr>
        <tr>
            <th></th>
            <td><input type="checkbox" name="enableComments" value="1" @(Request.Form["enableComments"].AsInt()==1?"checked":" ") /><label for="enableComments"> Enable Commenting</label></td>
		</tr>
        <tr>
            <th></th>
            <td><input type="checkbox" name="showComments" value="1" @(Request.Form["showComments"].AsInt()==1?"checked":" ") /><label for="showComments"> Show Comments</label></td>
		</tr>
        <tr>
            <th>Category : </th>
            <td><select name="categoryId">
                <option value="">Select a category</option>
                @foreach(var category in PageData["categories"])
                {
                    <option value="@category.id" @(Request.Form["categoryId"].AsInt()==category.id?"selected":" ")>@category.name</option>
                }
                </select>
            </td>
		</tr>
        <tr>
            <th class="case"></th>
            <td><input type="submit" name="submit" value="Submit" /><input type="reset" name="reset" value="Reset" /></td>
		</tr>


    </table></fieldset>
	
	
</form>